package cn.group7.padserver.controller.responseformat;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author 谷汉斌
 * @description 响应码
 * @createTime 2024/7/22 下午2:28
 */
@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum Code {
    /**
     * code 响应码
     * info 响应信息
     */
    DENIED(-1, "权限不足"),
    GRANTED(101, "权限已获得"),
    ADD_FAIL(-5, "添加失败"),
    ADD_SUCCESS(105, "添加成功"),
    DELETE_FAIL(-3, "删除失败"),
    DELETE_SUCCESS(103, "删除成功"),
    QUERY_FAIL(-2, "查询失败"),
    QUERY_SUCCESS(102, "查询成功"),
    UPDATE_FAIL(-4, "更新失败"),
    UPDATE_SUCCESS(104, "更新成功"),
    SERVER_ERROR(-999, "服务器错误"),
    ERROR(-6, "未登录"),
    LOGIN_SUCCESS(106, "登录成功!"),
    LOGIN_FAIL(-7, "账号或密码错误，请输入正确的的信息!"),
    REGISTER_SUCCESS(108, "注册成功!"),
    REGISTER_FAIL(-8, "无法注册的用户信息!");
    private Integer code;
    private String info;
}
